#include <tws_debugging.h>
#include <xwritelogexport.h>
#include "xdataqueueconf.h"

static const char k_queue_conf[]		= "queue.conf";
static const char k_ini_sec[]			= "";
static const char k_ini_key_QFont[]		= "SF Willamette";
static const char k_ini_key_QFontSize[]	= "QFontSize ";
static const char k_ini_key_ShowQueueDuration[] = "ShowQueueDuration";

XDataQueueConf::XDataQueueConf()
{
	m_inifile.open(k_queue_conf);
	m_inifile.readInt (k_ini_sec, k_ini_key_QFontSize,     	   m_queueFontSize);
	m_inifile.readInt (k_ini_sec, k_ini_key_ShowQueueDuration, m_showQueueDuration);
	
	char tmp[32] = {0};
	m_inifile.readString (k_ini_sec, k_ini_key_QFont, tmp , 32);
	m_queueFont = tmp;
	
	m_inifile.close();
	this->DebugOutput();
}

XDataQueueConf::~XDataQueueConf()
{
}

void XDataQueueConf::DebugOutput ()   //#
{
	DEBUG("QFont\t:%s",			m_queueFont.toStdString().c_str());
	DEBUG("QFontSize\t:%02d",	m_queueFontSize);
	DEBUG("Duration\t:%02d",	m_showQueueDuration);
}

QString XDataQueueConf::getQueueFont() const   //+
{
	return m_queueFont;
}

int XDataQueueConf::getQueueFontSize() const  //+
{
	return m_queueFontSize;
}

int XDataQueueConf::getShowQueueDuration() const    //+
{
	return m_showQueueDuration;
}
